<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class Tasks extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('tasks', function (Blueprint $table) {
            $table->increments('id');
            $table->string('user_id');//发布者ID
            $table->integer('type');    //利用数字表示类型
            $table->string('title');    //标题
            $table->date('public_time'); //发布时间
            $table->date('end_time');   //结束时间
            $table->integer('status');  //状态
            $table->string('location'); //发布地点
            $table->string('reward');   //奖励内容
            $table->integer('people_limit'); //人数限制
            $table->string('content');      //n内容
            $table->timestamps();

            $table->index('type');
            $table->index('user_id');

        });

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
